// const CompressionPlugin = require('compression-webpack-plugin')
// let path = '//gamequ.oss-cn-beijing.aliyuncs.com/admin' + (process.env.NODE_ENV === 'development' ? '/dev' : '/pro')
let path
let env = process.env.NODE_ENV
let title = process.env.VUE_APP_TITLE
if (env === 'development') {
    path = '/'
} else {
    path = '//static-game.duodian.cn/admin'
}
if (title === 'dev') {
    path = '//static-qugame.admore.com/admin'
}
console.log(path)
module.exports = {
    productionSourceMap: false,
    // publicPath: ,
    publicPath: path,
    assetsDir: 'manage',
    devServer: {
        proxy: {
            '^/admin': {
                target: 'http://dev-work.duodian.cn/',
                // target: 'http://work.duodian.cn/',
                // target: 'http://192.168.1.168:8082/', // 秋丽
                // target: 'http://192.168.50.160:8082/', // 马川
                // target: 'http://192.168.1.147:8082/', // 赵杰
                changeOrigin: true
            },
            '^/api': {
                target: 'http://dev-game.duodian.cn/',
                changeOrigin: true
            }
        }
    },
    lintOnSave: false
}
